/**
 * 实测实量API
 */
import Quality from '@/api/quality'
import request from '@/utils/request'
import { qualityApiUrl } from '@/api/config.js'
const SUB_SYSTEM = qualityApiUrl + '/reality'
// const SUB_SYSTEM = '/mock/27/quality' // mock
const checkItem = new Quality(SUB_SYSTEM, '/check-item', true) // 实测实量检查项维护
const tree = new Quality(SUB_SYSTEM, '/check-item/tree', true) // 实测实量检查项维护树节点
const pointList = new Quality(SUB_SYSTEM, '/point-list', true) // 实测实量点位清单维护
const pointListCheckItem = new Quality(SUB_SYSTEM, '/point-list/check-item', true) // 实测实量点位清单维护
const pointRefactor = new Quality(SUB_SYSTEM, '/point-refactor') // 实测实量点位清单维护
const map = new Quality(SUB_SYSTEM, '/map', true) // 实测实量地图维护
const table = new Quality(SUB_SYSTEM, '/table') // 实测实量台账
const count = new Quality(SUB_SYSTEM, '/count') // 实测实量统计分析
const thirdParty = new Quality(SUB_SYSTEM, '/third') // 第三方实测实量 列表查询
const statistics = SUB_SYSTEM + '/statistics' // 实测实量统计API（新）
/**
 * 实测实量统计新 汇总
 * @param data
 */
export function statisticsList(data) {
  return request({
      url: `${statistics}`,
      method: 'post',
      data
  })
}
/**
 * 实测实量统计新 左-组织树
 * @param data
 */
export function statisticsOrgTree(params) {
  return request({
    url: `${statistics}/org/tree`,
    method: 'get',
    params
  })
}
/**
 * 实测实量统计新 右-实测实量点位树
 * @param params
 */
export function statisticsPointTypeTree(params) {
  return request({
    url: `${statistics}/point/type/tree`,
    method: 'get',
    params
  })
}
/**
 * 实测实量统计新 右-分部分项树
 * @param params
 */
export function statisticsProjectSubTree(params) {
  return request({
    url: `${statistics}/project/sub/tree`,
    method: 'get',
    params
  })
}
/**
 * 实测实量统计新 右-工程类别树
 * @param params
 */
export function statisticsProjectTypeTree(params) {
  return request({
    url: `${statistics}/project/type/tree`,
    method: 'get',
    params
  })
}
/**
 * 实测实量统计新 左-检查区域树
 * @param params
 */
export function statisticsRespAreaNodeTree(params) {
  return request({
    url: `${statistics}/resp/area/node/tree`,
    method: 'get',
    params
  })
}
export {
  checkItem,
  pointList,
  pointListCheckItem,
  pointRefactor,
  tree,
  map,
  table,
  count,
  thirdParty
}